{% extends "base.jinja" %}

{% block title %}{{user_home}}的个人空间{% endblock %}
{% block keywords %}{{user_home}},{{site_options.keyword}}{% endblock %}
{% block description %}{{user_home}}的个人空间{% endblock %}

{% block css %},user.css{% endblock %}

{% block main %}
    {%- include 'user/head.jinja' -%}
    
    <div class="share page" id="share">
        {% if share_data %}
            <div class="u-crumb">
                <h3>{% if is_home%}我的{% endif %}灵感</h3>
                {% if is_home and user_home.group_id ==3 %}如何发布预约？{% endif %}
            </div>
            <ul>
                {% for share in share_data %}
                    <li data-sid="{{share.share_id}}" data-mid="{{share.cover_id}}">
                        <a target="_blank" class="s-link" href="/share/detail/all/{{share.share_id}}/" {% if loop.index0 >= 12 and share.background %}style="background:{{share.background}};opacity:0.5;"{% endif %}>
                        {% if loop.index0 < 12 %}
                            <img alt="{{share.title}}" src="{{share.cover}}!260" width="260"/>
                        {% else %}
                            <img alt="{{share.title}}" src="http://s.lovewith.me/static/images/blank.gif" data-src="{{share.cover}}!260" height="260" width="260"/>
                        {% endif %}
                        </a>
                        {% if share.is_video %}
                            <span class="ui ed-video" data-video="{{share.video}}"></span>
                        {% endif %}
                        <div class="s-ext">
                            <p title="{{share.title|forceescape}}"><a target="_blank" href="/share/detail/all/{{share.share_id}}/">{{share.title|safe|cut_str(32)}}</a></p>
                            <span class="s-ext-img">{{share.count}}P</span>
                        </div>
                        {% if is_home %}
                        <a class="ui s-del" data-require="sign" href="javascrpt:;" alt="删除灵感" data-sid="{{share.share_id}}"></a>
                        {% endif %}
                        {% if share.reserve %}
                        <a target="_blank" href="{{domain}}share/detail/all/{{share.share_id}}/#m{{share.cover_id}}" class="ui s-reserve"></a>
                        {% else %}
                            {% if share.sale_data %}
                            <a target="_blank" href="/share/detail/all/{{share.share_id}}/#m{{share.cover_id}}" class="ui s-sale"></a>
                            {% endif %}
                        {% endif %}
                    </li>
                {% endfor %}
            </ul>
            <div class="s-more"><a href="javascript:;" data-scroll="1" data-page="1" id="s-more-btn" data-action="/share/ajax/g/share/?uid={{user_home.id}}&utype=post">更多..</a></div>
        {% else %}
            <div class="s-nodata">
                {% if not is_home %}
                    <p>TA还没有发布过婚礼灵感</p>
                {% else %}
                    <p>还没有发布过婚礼灵感</p>
                    <a href="{{domain}}share/post/image/" target="_blank" class="inp-btn-pk">马上发布</a>
                {% endif %}
            </div>
        {% endif %}
    </div>
{% endblock %}